<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米产品卡片布局</title>
</head>

<style>
   * {
      padding: 0;
      margin: 0; 
   }

   li {
       list-style: none;
   }

   .box {
       width: 1226px;
       height: 285px;
       background-color: pink;
       margin: 100px auto; 
       /* padding-top: 15px ; */
   }

   .box li {
        float: left;
       height: 285px;
       width: 296px;
       background-color: yellow;
       margin-right: 14px ;
   }

   /* 单写一个.last不生效，注意权重！！！ */
   .box .last {
       margin-right: 0 ;
   }
</style>
<body>
    <ul class="box">
        <li>卡片1</li>
        <li>卡片2</li>
        <li>卡片3</li>
        <li class="last">卡片4</li>
    </ul>
</body>
</html>